﻿#ifndef _ADAPTER_EVENT_H
#define _ADAPTER_EVENT_H

#ifdef __cplusplus
extern "C" {
// #ifdef __cplusplus
#endif

#include <Windows.h>

// Event Adapter

typedef enum _Adapter_EventTypeEnum {
    Adapter_EventTypeInit,
    Adapter_EventTypeEnable,
    Adapter_EventTypeStop,
    Adapter_EventTypeLogin,
    Adapter_EventTypeGroupMsg,
    Adapter_EventTypeFriendMsg,
    Adapter_EventTypeReceivedTransfer,
    Adapter_EventTypeScanCashMoney,
    Adapter_EventTypeFriendVerify,
    Adapter_EventTypeContactsChange,
    Adapter_EventTypeGroupMemberAdd,
    Adapter_EventTypeGroupMemberDecrease,
    Adapter_EventTypeSysMsg,
    Adapter_EventTypePluginLoad,
    Adapter_EventTypeMenu
} Adapter_EventTypeEnum;

typedef struct _Adapter_EventParameterStruct {
    Adapter_EventTypeEnum eventType;
    int messageType;
    int session;
    LPCSTR pluginPath;
    LPCSTR robotName;
    LPCSTR payWxid;
    LPCSTR payName;
    LPCSTR fromWxid;
    LPCSTR msg;
    LPCSTR robotWxid;
    LPCSTR fromName;
    LPCSTR finalFromName;
    LPCSTR jsonMsg;
    LPCSTR finalFromWxid;
    LPCSTR toWxid;
    LPCSTR money;
} Adapter_EventParameterStruct, *PAdapter_EventParameterStruct;

typedef DWORD32 (*Adapter_EventCallbackFunc)(PAdapter_EventParameterStruct pEventParameterStruct);

void Adapter_SetEventCallbackFunc(Adapter_EventCallbackFunc pCallbackFunc);

#ifdef __cplusplus
}
// #ifdef __cplusplus
#endif

// #ifndef _ADAPTER_EVENT_H
#endif
